package book;

import java.util.Arrays;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: LENOVO
 * Date: 2024-08-02
 * Time: 11:57
 */
public class BookList {
    public Book[] books = new Book[10];
    public int usedSize;

    public BookList() {
        this.books[0] = new Book("三国演义","罗贯中",34);
        this.books[1] = new Book("红楼梦","曹雪芹",66);
        this.books[2] = new Book("西游记","吴承恩",88);
        this.usedSize = 3;
    }

    public Book getBook(int pos) {
        return books[pos];
    }

    public void setBook(Book book,int pos) {
        this.books[pos] = book;
    }

    public Book[] getBooks() {
        return books;
    }


    public int getUsedSize() {
        return usedSize;
    }

    public void setUsedSize(int usedSize) {
        this.usedSize = usedSize;
    }


}
